Support capsule "modes."

Add ability to define "modes" in the capsule configuration.
Merge pull request #12 from moxie0/modes-support

Support capsule "modes."