Implements merging in frame merger.