The readAll() method refactored.