Detect classes properly for docs