Pull refactored memoized helpers into 2.99

This pulls the changes from #937 and #938 into 2.99