more refactoring in prep for release