Add Generics

Add generics to a couple of classes. Reduces raw type warnings
by a couple hundred but still a long way to go.

Also fix indentation to consistently use spaces instead of tabs
in places along the way.
Heh. Previously quite a few empty lines were removed. Now three are added... To be removed in the future? ;-)