Refactor makeproject.