Added panel handling to the master gui