Added persistent cache structure for functions
Merge
finished memoizer