refactor 2d scene graph