Cleanup switchns code
Merge pull request #77 from ironcladlou/switchns-cleanup

Cleanup switchns code