clean merge code