Add method for all warnings.

Also simplify and document around.