Removed duplicate and redundant code
Merge pull request #1 from alexberriman/master

Removed duplicate and redundant code