Adaptive Merge implemented in C, need to fix memory leaks.