Commuting Pauli Hamiltonians as Maps between Free Modules