Heartbeat support

Fixes #44 
Closes #22 

Opened PR for discussion
In that case, do an `array_merge()` instead of a push.

(No need to call `array_unique()` afterwards.)