Add ability to filter routes programatically

Fixes #87.