Initial commit of semigroups

Fixing the semigroup test.