Refactored extract-files and setup-makefiles