Fix more code quality issues