refactoring the panels to use a renderer class