More refactoring on form templates