Added a model and graident solver, need to write manual gradient check for solver.