Remove duplicate code
Merge pull request #7 from Chris00/master

Remove duplicate code