Adding support for generics.