Output formatting with sprintf

Cleaner code using sprintf for the output string.  Also added change history comments and updated version string.