Added signature-based filtering, and some unit tests