Initial path connection code.