Another difficult merge done.

Merge this.