Add support for filtered traversals

Resolves #3