Improved `StreamReader` class