restructure: change position of script tags