Introduce ClassType and cast classes