major rework of ast, visitors and ui.