Refactored and cleaned up builder