Removing superfluous variables