removed all memory leaks in cw-bwt