Initial work on energy minimization