Better type determination and descendant class detection.