panel refactoring (WIP)