Refactoring of build script.