Use generics for all collections. Simplify loops using Java 5 foreach-loops. Declare collections using interface types. Minor cleanups and simplifications.