few changes on the ipv6.py logic, and a bit of code cleanup in tools.py,