fixed sign in friction force, and other minor physics updates
initial port of correctEnergy
added energy correction