refactor part 2/2

@bellycard/infrastructure 
More refactor.  More tests.