Transposition detector rewrite 2. Work in progress, but shows promising
results.