This version is not functional since the final alignment is not in the correct order, nor with the correct tip labels, nor even corresponding to the tips. The next version should create the sequences for every single object of substitutions early in the function (right after the while loop ends).