Move the js calls around a bit, hopefully to get a more accurate domLoaded
event
Merge branch 'develop'