Added RK4 implementation. May need to changefunctions to accomodate for changing variables.