Merge key refactor changes.