Removed duplicate code

OMFG. I am a horrible contributor.
Merge pull request #147 from dimsav/patch-3

Removed duplicate code