Refactoring for code quality improvement (based on Scrutinizer)