Small fixes made

Just a few grammatical corrections and spacing fixes in the JS code
have been made.