cleaned imagedownolader code and added code to store image in cache