Adding appropriate connection logic to detect status change.

Massive disabled code changes (will need minor debugging) to eliminate external influences on upcoming tests.