code style refactors
client detects its ip address
configuration fixes