Backporting some changes from articles branch.