AST reducer

Improved name generation