Refactored loading of images. Now use an ImageLoader class