Re-factorization updates.
Alternative Smith form transformations and commands. One more test case.