netsync: some cleanup (still very ugly)