The many lives of active galactic nuclei: Cooling flows, black holes and the luminosities and colours of galaxies | Synapse