Added a much improved exception handling system