Save delays to improve performance

Acts immediately on deactivate/close to ensure no changes are lost. Save
intelligently only updates necessary properties.