Effects of nonaxisymmetry in equilibria and MHD evolution of spheromaks