Update the structure for v2 and improve the preprocessing script