Refactoring according to #9