Queries for the number of warnings/errors
Move some function definitions into cpp files
Ensure certain expected number of diagnostics