Replaced lambda with poly1d.

Replaced lambda with poly1d to make it more consistent. Closes #1