Add the exception classes and many comments