Refactor makefile a bit