Refactoring of form