Document and change some function names.