1) Rename heartbeatDuration to heartbeatInterval
2) Add example/integrated.js as an example usage
3) Add some more unit tests