Optimizing script loading, implementation

#optimization