Add support for exceptions
Clean the import