Convert Term class into Factory