Add metallicity tracking and metallicity-dependent cooling