Add some jsdocs to the core classes. Fixed a couple of typos found by
the test suite