flattening the AST structure a little bit