Ditch byte strings, some refactoring