Refactor some some of the dev_panel internals