Converted into library.
Added static library to makefile