Optimize and simplify preloader