Many small improvements to get client mor robust. Also hardcoded fixed
IP assignment. Needs to have a review, and must be connected to
preferences.