Add Generics

Add generics to a couple of classes. Reduces raw type warnings
by a couple hundred but still a long way to go.
Merge pull request #127 from marschall/generics

Add Generics