Refactored linearfem so that it is more library-ized

Now the linear finite element method can be called without having to
hard code stuff and now we can dynamically link that library instead of
having to hard link and compile it in the binary. Yay for everybody