moving from setInterval
add test for keepalive
added options.compatibility, this closes #9