Cleaned up some code for filtering programs to use sets. Also added a search action.