Breaking up into smaller modules; adding scalar monoid