Squash and resolve merge conflicts for "Take 2 - refactoring tests" PR #6

See #6 for history and discussion.