add some tests for cleaning with operators; fix a few minor issues to make all tests pass