To come back on your legend question:
you have to do it on the form, not on the fieldset.
So I guess in your case this would become:
instead of
return new SearchForm($this, "SearchForm", $fields, $actions);
do
$form = new SearchForm($this, "SearchForm", $fields, $actions);
$form->setLegend("My Legend");
return $form
Although I'm not sure which SS version you're using and if this was part of 2.2.3 already...