Panel class refactoring