Added in LRU cache and tidied up the toJson code