Changes classname to when and showoption to showOption for consistency and returned alarm on addAlarm and updateAlarm