Use less deprecated code