Tweaked generics a bit.