Refactoring build-scripts