Removes redundant static variables.