Delete duplicated code.
Merge pull request #2 from devhot/refactoring

Delete duplicated code.