Added some comments + input checking + template for multiplex extension