Merge pull request #69 from powerist/working

Modularize switch connection