Added toString() function to Terms