fixed HMC bugs! commented and cleaned up code