Added verify command.
Small refactoring of commands. Other minor fixes.