Reformat to conform to PEP8
Add support for IPv6