Remove sync file directly after merge.
Externalize SyncToImap code into an own file.