Base detection on classes we actually use.