Updated the TypeResolver to be more flexible in the types of classes it can handle.