Minor cleanup of debug and error messages.