formatted JS to be consistenet with JSLint
clean up some indentiation and definition links
reflow text