Refacting handlers that are using deprecated classes.