fix some in alarm subsystem
some refactoring, improve notification