Save and restore functionality implemented