Fix conversion bugs from images to values
Add tool functions to convert into and from strings