▁because ▁of ▁his ▁strong ▁opposition ▁to ▁the ▁an nex ation ▁of ▁Texas , ▁he ▁was ▁defeated ▁in ▁ 1 8 4 4 . ▁His ▁influence ▁in ▁Congress ▁was ▁largely ▁responsible ▁for ▁the ▁appropri ation ▁of ▁$ 3 0 , 0 0 0 ▁to ▁test ▁Samuel ▁Mor se ' s ▁te legraph . ▁In ▁ 1 8 4 7 , ▁Kennedy ▁became ▁speaker ▁of ▁the ▁Maryland ▁House ▁of ▁De leg ates , ▁and ▁used ▁his ▁influence ▁to ▁help ▁the ▁B & O , ▁although ▁by ▁the ▁late ▁ 1 8 4 0 s ▁it ▁was ▁caught ▁in ▁a ▁three - way ▁controvers y ▁with ▁the ▁states ▁of ▁Pennsylvania ▁and ▁Virginia ▁as ▁to ▁whether ▁the ▁B & O ' s ▁termin us ▁should ▁be ▁W heel ing , ▁Park ers burg ▁or ▁Pitts burgh . ▁After ▁an ▁ac rim on ious ▁share hold ers ▁meeting ▁on ▁August ▁ 2 5 , ▁ 1 8 4 7 , ▁the ▁B & O ▁aff ir med ▁W heel ing ▁as ▁its ▁termin us , ▁and ▁finally ▁completed ▁track ▁to ▁the ▁city ▁in ▁ 1 8 5 3 . ▁ ▁Meanwhile , ▁President ▁Mill ard ▁F ill more ▁appointed ▁Kennedy ▁as ▁Secretary ▁of ▁the ▁Navy ▁in ▁July ▁ 1 8 5 2 . ▁During ▁Kennedy ' s ▁ten ure ▁in ▁office , ▁the ▁Navy ▁organized ▁four ▁important ▁naval ▁exped itions ▁including ▁that ▁which ▁sent ▁Com mod ore ▁Matthew ▁C . ▁Perry ▁to ▁Japan ▁and ▁Lieutenant ▁William ▁Lewis ▁Her nd on ▁and ▁Lieutenant ▁L ard ner ▁Gib bon ▁to