Saving image_cache to file; closes #11.
Corrected behaviour of image cache.
Also added some comments and verbose messages.