remove unused lemma, minor refactoring