Modified test_reader to reflect merge of code in read_data and _read_data
functions to adhere to DRY principle.