Minor modifications to PanelRender code to make it more readable