Fixed merging method. Now works but it is slow and it could give better
results.
Moved part of the code of the 2D merge to have smaller methods.
Added comments about the merge methods