More work on proximal_words algorithm