improved version

Simplified rk4, and corrected some mistakes in eom function.