a bit of refactoring.  nothing significant.
finished sample unit and integration tests