Added @lpshanley's create_panel_if_nonexistent function