Reverted changes to working version of advanced search