refactored: Form class (untested)