Add command mode

Added command mode.