Modify history search a bit (main change: remove support for searching by history event code).