Changed CanvasController into an object