Add jsdoc
Refactor