Refactoring -> should make @kenoir happy