Changed mconcat in Monoid instance from msumBalanced to msum.
Added class for semirings