Sep characters in merge.csv

Fixed merge.csv so that it works with different separator characters.
Also made the code prettier.