Improve class retrieval