Build script refactoring.