Fixed some awkward whitespace resulting from s//'s
Fixed eqTerm to properly use a helper function