reorder scripts for speedy loading