Boron doped diamond films: Electrical and optical characterization and the effect of compensating nitrogen