Fixed a bunch of errors and added a Makefile that creates a shared library