Removes unneeded variables in tests