more hacking away at various refactorings