Treat warnings as errors

and add missing comments