Republicans capture House, gain in Senate