Monomial refactored. Must override equals in class