js to footer and other fixes