Refactoring according to Ben's review