Moved polling functionality into task classes.