Added legend, image preloading