Added image preloader. Removed old code