Updated Preloader with Preload code from the prototype