Make it more general - calculate moments.
simplify using genfromtxt
Cleanup