Search cleanup for advanced search: WIP