Use printf instead of str_replace

Didn't know printf existed (facepalm)... now I've got to replace all of the str_replace workarounds I put in the code.