moved script loading around to make site sensible