Adding separate type generation and retrieval.