spelling fixes; initial function comments