Added toString for terms.