updated class-generator to give proper class name

added tests for error classes.