Remove unnecessary intermediate vars.