#6285 Refactor after the merge with master