Removing some calls to deprecated functions