Add generic types for classes and fields