continuing to work on tests, small amounts of refactoring