Add functionality for copying files. Fix initial sync.