Refactoring to better use of inheritance to process "exceptional cases"