Fixing up generics to make api easier to use