query: do not save the panel in args

args is meant to be serialized for local storage

factory functions now get panel as another argument