Refactoring and ArrayReader tests added.