"finite part" of an abelian pro-p group

I'm trying to understand the proof of the following:

Let $G$ be an abelian pro-$p$ group, and let $N\leq _O G$ be an open subgroup such that $N\cong\mathbb{Z}_p$. Then $G\cong\mathbb{Z}_p\times T$ where $T$ is a finite $p$-group.

An outline of the proof is as follows: $G$ has a finitely generated open subgroup so $G$ is finitely generated. Hence (1), $G\cong A\times T$ where $A$ is f.g. abelian pro-$p$ and $T$ is a finite abelian $p$-group. So we have $\mathbb{Z}_p\leq_O A\times T$ and hence(2) $A\cong\mathbb{Z}_p$ as desired.

I don't understand the two steps marked (1) and (2). Why do we have the decomposition $A\times T$? And why $A\cong\mathbb{Z}_p$? As far as the second one goes, I see why $\mathbb{Z}_p\leq A\times\{1\}$, so we can say that $\mathbb{Z}_p\leq A$. We also know that it has finite index in $G$ and hence has finite index in $A$. What now?

For (1), I can try taking a set of generators and take $A$ to be the subgroup generated by the infinite-order generators and $T$ the subgroup generated by finite-order generators. Then $G=AT$ but I'm not sure why the product has to be direct, that is, why should the intersection $A\cap T$ be trivial?

Any ideas? I think I'm missing something quite basic here...

For (1), you consider $$G$$ as a $$\mathbb Z_p$$-module.
$$\mathbb Z_p$$ is a PID hence it satisfies the structure theorem for finitely generated modules, and they can all be written $$\mathbb Z_p^n\oplus T$$ where $$T$$ is some finite abelian $$p$$-group.
For (2), you note that you have an injection $$\mathbb Z_p\to \mathbb Z_p^n\oplus T$$ with finite quotients, which implies that $$n=1$$ (you can see that, e.g. by tensoring with $$\mathbb Q_p$$)