Split scripts to load in <head> and before </body>