cleaned code, improved makefile