a few more refactors and renamings