Port removeMergeMessage.
Rename functions.