Refactor CanvasGraphics