Fixed #100 moving most inline JS to the footer