Unique factorization of matrices and Towber rings