cleaning up switch api and adding docs
Merge pull request #6 from jonstout/switch-api

cleaning up switch api and adding docs