create an EntityService; move entity-related methods to the EntityService