Make the reading loops more clear and consistent