Completion: move remaining utils functions

The remaining utils functions were used only in Completion.