Working on js for merge script