Initial commit of multiplexing code.
Major functionality present.