mergerepo: refactoring