instances manager refactor, added cache for geometries