rewrite ModeAndValue and Arguments structes and correct other files
corrects tests