Added ExceptionHandler class
Modified exception handling where necessary to use new class