Add semicolons where missing

This PR does 3 things:

* Removed reliance on ASI for all non-test js files by adding semicolons where they were missing.
* Remove two code blocks that were dead
* Trim trailing whitespace which my editor added for me but I think it probably a good addition.