Adding API for alarms

A new merge-able pull request based on #11