Use a waitgroup rather than channel-and-counting for sync.