Static analysis, misc tweaks