Add whitespace to make JS more readable

Add newlines after curly brackets and semicolons to make the JavaScript more readable.