Code refactoring for AstBuilder and generating AST for more nodes