Compounds containing hydrazine or azo groups