Refactoring
Refactoring input and output keys in Connection