Reordering of functions in src/panel.c, just for better grouping.