Clean up some invariants and fortify comments