Cleanup deprecated code