added struct parsing and some support classes