Refactored makefile + removed old code