Refactored drivereader.py