Fixed code quality issues