Merging in changes from the mainline.