Refactor exception (now error) classes.