Search Dialog: make sure we do not add a field twice

Also minor fixes on comments and make a set of base categories for faster
lookups
test results: fix name error in notification
test results: remove unused batch_mode parameter

this was actually "dry run"