some changes to struct2text
changed marks management a bit