Adding in support for AllRowsQuery. Also small cleanup in unit tests.