Initial changes from upstream.