The evolution of massive black holes and their spins in their galactic hosts