Democrats gain control of House