retrigger delay working and mode API

Fixes #53
Fixes #121