Updates to use std::string and references.