Changed connection retrieval to use the concept of using a provisioner. Additional citation of information for code where the original concept was not by me