more cleanup, some lemmas