documentation updates.  also renamed some internal routines.