caching images and other smallfixes