Added some comments.
Improved performance of _read_record().