add semicolons and remove trailing whitespace

All tests pass.