Refactor selector evaluation