Refactor opening a connection into a helper function
Wire up is_initial