Merge pull request #106 from alex/duplication-reduction

Remove much of the duplication found in the tests