Refactored code to filter out already-selected searches and columns