Moved scope_string out into its own method.