added image caching script and adjusted some files accordingly
added caching script