Moved loading of scripts