New multiplexer

Split of #156, by @rmoura.