Added the nth connection function.

Need to refactor some of that code. I think some of the methods are superflous and may create too many unnecessary objects.