Improved application save/restore functionality.