Changed Tableout functions to use ByteStrings instead of Strings