Refactored form builder