added jsdoc in code
Reviewed most of the doc to be jsdoc3 compliant + added npm run doc script
First version of a generated API