Updated to reduce use of malloc/strdup -- current run-time use is only for logging