Implement initial support for generics