Simplify+improve where implementation
Merge pull request #125 from megawac/where

Simplify+improve where implementation