Add implementation of arbitrary monoids in LmsBackend