Implementation of component merging