Cleaned deprecated code