Memoize where it makes sense to