Consolidate test statements
Add function to filter data structure

Only works on flat structures right now.  This should be used and
let-bound to a variable when that variable is going to be used a lot.
Theoretically, it should be faster than traversing through the entire
data structure.  Think of this as a Emacs-local version of the API's own
filter.