Remove obsolete query event handling code.