finished off the demultiplexing commands. moved stuff around.