Cleaning up filter handling; fixes #104.