Added a ClassTypeID class to reduce code duplication