move filters to an external library
Merge pull request #860 from ForbesLindesay/patch-1

move filters to an external library