esprima inclusion, code refactoring