Add lagrange function. Fix bug where adding to polynoms changed the polynoms as well