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.