Don't echo modules into the footer

Finish conversion to using localize_script