Added logic to cope with reconnecting to a different network
Fixing Windows Run as Service things