image loading functions now take canvas as an argument; store global canvas object