IntelliJ-based code cleanup.

* Optimized imports.
* Reformatted code.
IntelliJ-based code cleanup .. Pins codebase to JDK1.5 and higher

* Removed spurious semicolons.
* Removed unnecessary boxing and unboxing.
* Removed spurious toString() and String construction.
* Removed redundant type casts.
* Replaced == and != with equals().
* Replaced for and while loops with forEach.
* Simplified conditionals.
* Flipped method parity.
Fixed infinite recursion bug in unused code.
Add typecase to clarify lookup in a Map.
Minor cleanup and tweaks and updates to set up notes.