Moved most JS to bottom of doc.