was passing wrong variable to updateWindow function argument. also updates duplicate function comment
also some other minor bug fixes
watch if chain head changes in a given window of api polls allows setting a threshold of how many times the chain head can remain unchanged before failing health check also can set interval for polling chain head on failure, restarts systemd unit