set and clear form helper methods, minor refactorings