MRG: Cleaner tests

In the process of working on #253 I was a little bit surprised by the number of warnings during testing. This cleans that up, and fixes a couple minor errors along the way.

Ready for review/merge.
I think we'd also have to query the current filter state, and set it back to whatever it was before, no?