Added docs

Added JSDoc annotations for most of the public functions and classes
that the client can use.