Stocks gave up gains early in the session Wednesday to trade lower for much of the day. Pessimism overwhelmed markets after Federal Reserve Chair Janet Yellen said again that a December rate hike was still on the table pending upcoming data. Kraft Heinz (KHC) announced plans to slash 2,600 factory jobs and close seven U.S. facilities and one Canadian plant over the next 12 to 24 months. The company said the downsizing will eliminate redundancies caused by Kraft's merger with Heinz earlier this year. Crude oil closed below its newly-reclaimed $47 a barrel level. That was after domestic inventories rose for a sixth straight week. Lower oil prices pushed the energy sector into a selloff to lead broader markets lower.