Fix doc generation for global functions + better sort for wordlist.txt