Finished 137 memoization

Fixed #261