Implemented shortener; fixed bug with missing parenthies when printing terms