Lots more work on advanced searches