Updates for working with images and xhr