Minor variable name changes.
Modified to merge local and remote changes into common ancestor rather that simply merging local and remote versions.