Converted from pattern match to plugin-style.

Now the non-plugin commands use the same mechanism as the plugin commands --
calling to a module and catching errors.
Added a convenience output function.
Abstracted common error messages.