demux reworked

Demux starts on top layer then moves to first layer and goes up from there.