simplify setMode() semantics
Merge pull request #105 from yetanotherhacker/modesemantics

simplify setMode() semantics