Merged in wip2.