Optimized _GetEntitiesInEntityGroup method for higher performance.

Introduced caching, deleted some of unused methods.