Adding the final functions to the leader_run. In the meanwhile, the setdatalen ha been commented out to avoid receiving partial data. This is a conservative move