Add diagnostic sections. Add graphics diagnostic method.

Thanks @horst.