Added some caching.