Vastly simplify handling of mode switches, and short-syntax interval
changes. Substring matching of mode names and commands will come
shortly, however the previous method of substring matching modes (it was
not available for commands) is currently not working.
TODO: implement table lookups for mode-specific commands.