Republicans win the House with a slim majority