Include ip_range.py in packaging
Refactor ip functions