Optimizing script loading

#optimization