Add functions for constant and variable symbols used in a term

Bonus: A merge commit!