Improved reader.py