Toggle and off modes.

Toggle mode is based on the work done by @bramstein on simple mode pull request.

Off mode is based upon my own assumptions about how such a mode should work.