Merge pull request #15 from DrMarcII/master

Change to allow multiplex code to be used as a library.