Refactored form to decouple building view from form instance