Added expando memoization for performance gains