Static code analysis tools and fixes