First shot at the merge script