Clean up some code analysis issues