Carbazole and trinitrofluorenone: an ab initio investigation of ionization potentials, electron affinities and excited states