Refactoring exceptions structure