Added object oriented programming! (though honestly we were halfway there
already... go past us).

Class defined at top of lib.py. Changes made in lagrange_solver to take
advantage of actual state object.