Getting rid of deprecated apis.