lm as a library

Easier to install and use a library.