Add variable name rewrite feature, and add optimization of if statement