Added generic command handler and responding for commands.