Merge and edit unnecessary portions