Support for left-end rewriting added.