Initial port to 8.x.