Refactored CanvasPointer class