Connection refactoring with ConnectionController (not sure if works)