Using str for value, since repr causes double escape in strings
Revert "Changed returned string from leaves to unicode, it was causing encoding issues"

This reverts commit 696eaf5973886e9e7705d1cde28bb0cd3650870e.