Remove some redundant assignments