AST node counter
minor config changes
Optimizations refactoring. Tests fixes, new cases added, new way of optimizeAST running added.