Galois actions, purity and formality with torsion coefficients