Added extra memmory caching.