Reformat code
Convert to C (no need for a C++ compiler)
Remove unnecessary type cast to char *