clean up and change the image loader