Refactor build process.