refactoring, initial makefile support