Rename all bgStr -> bgstr
Correct bgchar semantic (actually is a bgbyte), rename bgChar -> bgchar