cleaned up Connection instantiation
few tests added