Added new entity classes and refactored some of existing ones.