More js refactoring and comments.
Whitespace cleanup and comments in pjax js.