Fixes and refactorings to makeproject running