Allow querying for any state, and more robust filter lookup