Refactor to make esnext optional via --esnext