Switching from window to references to canvas obj