new Makefile \o/
some cleaning up and refactoring