Diagnostics

Its about time I actually get diagnostics put into master.
Yeah, these should be done in parallel, ill rewrite.