Added several functions to simplify merge, which still doesn't compile. However function combine has been tested for merging two trees of same order and it is working.