Add support for active form validation and refactor some form methods