Updated the exceptions system and made some other tweaks along the way.