Rename internal functions for consistency.
Fix some typos.