more cleanup/refactor/comments