removed dead code and tests; minor refactoring; made a start on adding exception-custom-error-page tests