Cleaned up some code analysis issues