Get rid of deprecated API calls.