Delete useless variables and comments