  There are several results in the literature concerning $p$-groups $G$ with a
maximal elementary abelian normal subgroup of rank $k$ due to Thompson, Mann
and others. Following an idea of Sambale we obtain bounds for the number of
generators etc. of a $2$-group $G$ in terms of $k$, which were previously known
only for $p>2$. We also prove a theorem that is new even for odd primes.
Namely, we show that if $G$ has a maximal elementary abelian normal subgroup of
rank $k$, then for any abelian subgroup $A$ the Frattini subgroup $\Phi(A)$ can
be generated by $2k$ elements ($3k$ when $p=2$). The proof of this rests upon
the following result of independent interest: If $V$ is an $n$-dimensional
vector space, then any commutative subalgebra of End$(V)$ contains a zero
algebra of codimension at most $n$.
