Preparing for saving the panes's states