Pulled everything but main.c into a shared library