Refactored a bit, found a problem with rotten traffic limitations - see TODO