Added Save, clear, and restore functionality