README updates: typos, code blocks, empty space

- Add javascript declaration in code blocks, to help with github
  markdown.
- Fix various typos.
- Remove empty space at the end of lines