Implemented entity caching, improved performance.