Implement run_command, add invalid_command, rename known_protocols.