cleaned up persistent class and persistent memoize