Code refactoring after Bjorn review