Accretion, ejection and reprocessing in supermassive black holes