clean up compiler errors and add makefile