Mostly done but buggy merge_hi function (and removed recursion depth sentinel var)