Simplify some code that was needlessly complex
Merge pull request #1040 from alex/pointless-code

Simplify some code that was needlessly complex