Refactored the form builder.