Fixed up for little buglets (mostly name changes elsewhere) that crept in during the year this code sat without being run.
Added history comments to changed routines.

Signed-off-by: David Brainard <brainard@psych.upenn.edu>