Re-indent to new 2-space standard

At some point I decided to follow some standard and use 2 spaces for
indenting Javascript and used that for new functions and forgot to
re-indent the old ones; fixed now! (Exciting changes, I know.)