Refactors Makefile