refactorings\fixes by code inspector