Implemented the entity registry

Added the entity_obj base class and the entity_registry