Fix missing semicolons.
Add hints to quiet JSHint.
Clarify regex literal.
Fix whitespace.
Fix modal re-declaration and property vs. dictionary syntax.
Fix equality operator.
Fix increment operator.