Refactored structure, added cache instancing test