First draft of a filter module

Will extract into a node package once I'm happy with it