Simplify code
Merge pull request #1 from mscdex/patch-1

Simplify code