Mark - Move connection code out of test.