Lots of jsdocs and spelling fixes.