Refactoring and implementation of form models