Fixed client connection retry issues... Cleanup and small fixes..