Refactored/cleaned split_traffic.py