Refactored Form class