Refactor and simplification of caching/stitching