Agr reader refactoring