Fix various deprecated uses.