Miscellaneous code and message formatting changes.