Fix advanced search and shorten search URLs (#307)