Refactored build