Removes extraneous variable declarations