Added ability to register connections in the IoC container. Closes #851.