Eliminated unneeded variables and structs.