Some refactoring in prep for additions