Reduce calls to .clone() and .to_string()

I saw this somewhere but could not remember the name. Thanks!