Replaced references to deprecated code with new references.