Revert "fixed race conditions"

This reverts commit 044830ae9394a9db7eb2327c755fe2adc085d617.
guard lock in startPolling and stopPolling
rearranged type definitions