Added a generic tool to implement filters (not fully functional yet)