Merge main program