refactored ode solver into math and agrad/rev components and also split out tests and updated doc