Refactor Makefile