Merge branch tmp-merge (second try)

This branch updates BWT and solves bugs in data structures.