Various updates.
Fixed up incomplete merge.