Refactor/panel setup