Clarify/improve some merging code with justin