more cleanup, not quite ready to merge to master