add cpychecker inspired fixes; document how to do the same