Cleaning up deprecated code