Work on exception management

Work on the exception handlers