Small refactoring, add Map:entitiesOfType