Merge pull request #10 from gavinlaking/feature/duplication

Further refactoring;