Replace deprecated functions.
Fix deprecated names.