Periodic sync, alarms refactor