Select fields in advanced search and minor test cleanup.