~str -> StrBuf where necessary. Made minimal changes
Remove priv keyword