Updated to remove deprecated code