Initial version of the merge script.