make ast_helper more modular
simplify