issue #70: Added some testing for interaction of conditional errors with form submission. Some refactoring.