Replaced ByteString with Text (untested...)