Unify uchar/char conversion

Fix #6
Cleauup
Fix missing cast in comparision

Ref #6