updated entity class system for easy json parsing and management.