forms: added close option & improved template structure