Added some asserts to character conversion
Indent fixes