Created Memoizer to automate caching.