Refactor of ODE classes