Fix #17 #18
Update JSDoc and cleaned up code for #17
Update API and minified JS for #17