Organized imports.
Added serializable class version number where necessary.
Changed editor settings to use spaces instead of tabs.
Removed unused local variable.
Replaced deprecated methods.
Replaced raw types with generics.

Replaced usage of Iterator with for-each loop, where applicable.