Removing deprecated api usages.