Fixed #6: polling period should be configurable
doc: add pollPeriod, correct opts.wait