work on simplify ast and work on tree
work on statemap resolve references
simplify common tree interface