Code cleanup

- added missing semicolons so library can be safely minified
- bugfix: changed trailing commas to semicolons
- removed unused variable: "that"
- trimmed trailing whitespace