Refactor the filters to work better with the GUI.