re-indented client-side js to 2 spaces per tab, removed jslint errors