Lots more cleanup from code analysis.