IP address is now more reliable.

Lots of refactor.
RDP not reimplented yet.