Fixed jshint warnings.
Added/updated documentation.