First action - merge.
Code for merging based on bitap.