add jsdoc and cleanup interface
add new examples to the documentation