Re-write merging, seems to work really well now.