Refactor build configuration