make load_command() and load_all_commands() standalone utilities
extract find_command_to_run() method