Convert some code to use std::string and C++isms.
Fix a few things which have been missed to WriteNotice.