Fully covered code, and removed code that cannot be executed such as the check for the missing IP address in a hostsfile (the first non-whitespace field will be considered the IP).