Modified to print to string
new definition of wtpinfo_print
wtpinfo_print integration
some corrections