Connection class, refactor.