Refactoring connection class.