Move char string buffers to local variables instead of global