Add LruCache, refactored code