Use Rubocop

Run it as part of the test suite. This should help to retain some
consistency.
Make code pass Rubocop

This consists mainly of minor formatting changes.