Refactored and added wrapper classes for Entities and Collections and simplified the API