ui.tools.listener.history: cleanup and minor bugfix.