Lie algebraic methods in the Riemannian geometry of nilpotent lie groups