Remove unnecessary unsafe block
Change some memory-unsafe CStr unwrapping into memory-safe CStr unwrapping