Added more tests. Made some methods in connection class private