Move exception classes to separate files.