Added muxing functionality
Lots of renaming