Yet another re-architecting, this time allowing for better handling of
custom exceptions.