[WIP] Refine bytestream reader.