Added panel saving functionality