Reorganize exceptions and Message class