Move every variable that is specific to get_string_property() into that function.