Improving code climate score by refactoring