refactor layout, boto class patching to allow cache invalidation