Add linter and fix lint warnings.

See #111.