Refactor Connection and test some of ConnectionController. AH-281
Testing of ConnectionController at 79%! AH-281