Monoids Given by Rewrite Systems