Some refactoring. Event system was changed to Alarms