started work on moving memoization from AST to utility class