Overhaul exception hierarchy