Don't duplicate logic in where/case
Merge pull request #65 from amalloy/simplify

Simplify some stuff