Rules code cleanup

I decided to start helping out with this as I am helping with a CSSLint text editor extension.  I though I would contribute by helping with some code cleanup.  Most of it is formatting using JS-Beautify and some is getting rid of JSLint errors.

Practically all of the code should pass a JSHint.