Refactored exception classes.