Refactor build.