Adding error check and updating JsDoc
minor error checking fix
put tagtracker into a module