Tidy up, move JS to footer