better handling of pipes and exchanges, start sorting/tracking