Fixed some math stuff in the update function. Should all be correct now