Moved canvas-update function into canvas ns