Tidy up docs.js and livedocs.js
Merge pull request #144 from rowanhill/clientside-js-tidy-up

Tidy up client-side JS