Improved error clasess management.