Wall St ends up slightly; energy shares rebound