JS Styling

Not sure how you feel about this but I'm pretty rabidly a spaces-over-tabs kind of dev (it's our in-house style here at Bocoup, and most popular JS projects use spaces). I converted to spaces, but if you want to keep it tabs I can roll with it!

Also, I did some very minor cleanup of the indentation and a few stray braces.