Documentation

Added documentation with jsdoc