Added new AlarmManager functions and committed forgotten changes.