Clean up string format in lib