refactor panel/view