Merging layers