Updated Monoid instances and tests.