Cleanup in code, add Makefile