refactored and imporved image cache / image rescaling
cosmetics