Refactoring according to reviews done