Remove v1 interface as per issue #27 plus misc code tidy up

Also fixed a bug in whois code for not closing connections.