Rearranging external scripts