Made initial type info from parser into ref form so it can be changed later
Added structure generating code