remove unused images and preload map