Cleaned up headers and code

Cleaned up mixed spaces and tabs in code, cleaned up JavaDoc-style headers, and cleaned up braces on if-else statements. This minimizes issues with JSLint and keeps the code looking great when people wish to extend! Bravo to janhartigan for creating this!