Rename some functions. Update doc.