Removing unneeded variables