Entropy/selfmod: Fix bug with ? in strings. Add convenience functions.