Remove duplicate code
Merge pull request #368 from jcxplorer/master

Remove duplicate code