Replaced all the individual vsnprintfing with a macro