Refactor of Panel type