Use ProgressbarText2 instead of ProgressbarText

The advantage is that the message in the ProgressbarText2 is able to
display the elapsed time.
Fix pylint warnings
Use Euclidean distance to choose the best codeword

Before we were using chordal distance (angle based), but it might choose
a codeword in the opposite direction of what we would like it to.