Implemented the alarm and the settings