commandlib and settings. Split from send_command.