Move demux into it's own module