refactor comments and missing semicolons in js and refactor some comments on module