Revert "Removed snapshot for push."

This reverts commit 3749bd1f1cde9f4327b8b0e7b4518c8e003aea9b.
Fixed test order sorting.
Fixed previous wrap-around bug.