Smal complexity improving refactoring