Use IHandler in alarm core

The aim here is to create Handler suitable for testing.