Merge and refactors