Modifying repl to use std::stream and std::getline