more cleanup, more regression tests