New sync loop implementation, download part. WIP.