Fix #2. Add JSDoc for documentation.