Added support for generic types.