Made some changes per review feedback.
- Handle null connectionId after unprotect calls.
- Use singleton UTF8Encoding class.

#1305