Add syntax tree permissions. Complete summary. Fix small bugs