Fix compilation errors due to API changes
Add necessary API to retrieve classes