Error class updates and unit tests