Almost completed the base code structure, events , alarms and settings are now working properly.