split exceptions out into their own module, fixed a bug in the splitting