Refactored structure of exceptions