Remove duplicate code.
Merge pull request #19 from mrappleton/method-refactor

Remove duplicate code.