Modified memoize functions
Fixed characters in docstring