Further refactoring of the FormElement class.