Changing canvasController into an object