optimized js and added preloaded images to css