Separated common functions for computing the energy into energyutils.jl
added data directories