Some minor improvements to reader.py