Form refactoring with directives.