Refactor a bit and added some alarms