Copied from ALTTwo folder
New branch. copied from ALTTwo folder
reordering_to_file method added, fixes of bugs in calculating reordering
probabilities.