Code cleanup to be more conforming to style guide.

- Return `Unit` instead of using procedure syntax.
- Explicitly listed return type for `def`s.
- Added/removed `()` for arity-0 methods depending on whether or not they have side-effects.
- Removed unused imports.
- Fixed missing "`" in doc strings.
- Removed redundant `final` qualifier.
- Renamed values to prevent shadowing.
Nice catch on parens change. FTR and FWIW, it appears in the spec that `Any.toString` is nullary (no param list), but defining it with parens does not trigger `-Xlint:nullary-override`, maybe because Any is a figment and of course it has parens from Java.