Remove some usage of deprecated calls