Clean up deprecated code