Added custom classmapping callback to determine classname