refactored the panels to be less rigid